1. Field of Invention
This invention relates to a method of identifying an object to be detected from image data comprising one picture.
2. Description of the Prior Art
According to a prior art method of identifying an object to be detected (hereinafter, merely called an object) the object is photographed with an image pick-up device of an industrial television camera for example, the photographed picture is scanned, and a bright and dark pattern (brightness pattern) comprising image data of a predetermined number which are continuous in the direction of scanning is compared with a reference pattern which has been prepared previously and representing the brightness of the object. With this method, however, in spite of the fact that the picture is inputted with multistage tones, the actual processing of the data is made after converting the data into binary codes, such method is practical where electrical component parts can be assembled under satisfactory optical environment and high quality binary picture image can be obtained relatively readily. However, if a special light source for image pick-up is not available so that the object is photographed under the influence of solar light, as the brightness pattern of the object varies greatly, correct identification of the pattern is impossible. Furthermore, background and noise may cause erroneous identification.
In the method of identifying an object by comparison of patterns, where the objects are arranged in a predetermined direction, for example substantially perpendicularly to the direction of scanning, detection is possible, but the objects such as rods or logs 10 are randomly distributed as shown in FIG. 1, it has been impossible to detect the object in all directions. Furthermore, as in a factory in which directions of illumination are not uniform so that brightness is influenced by solar light, the brightness pattern in the cross-sectional direction varies according to the direction of the object. For this reason, detection of objects which are randomly directed is very difficult.
Furthermore, according to the method of identifying the objects by comparing patterns, identification is made by judging whether or not an evaluation value representing the similarity of both patterns exceeds a threshold value set for the evaluation value, but where the evaluation value varies greatly in accordance with the size of the object, it is impossible to exactly evaluate the evaluation value even when the threshold value is set to an optimum value.
For example, let us consider a case wherein rods 10 are photographed with a industrial television (ITV) camera and 4.times.16=64 picture elements (see FIG. 2) are obtained from the image information thus obtained. A graph as shown in FIG. 3 can be obtained by determining an evaluation value utilizable as an index representing the cross-section of the rod from four picture elements comprising the cross-section of the rod and then depicting the evaluation value along the longitudinal direction of the rod. As can be noted by the comparison of FIGS. 2 and 3, when the central portion of the rod becomes dark due to stain or spoil thereof, the evaluation value would vary greatly at such portion.
Where a definite threshold value Y.sub.0 is set as shown in FIG. 3, the region exceeding this threshold value would be cut by the dark portion of the rod, thus resulting in an erroneous evaluation of the length of the rod.
According to another prior art method of identification, a contour of an object whose brightness varies quickly is determined from binary encoded picture data obtained by an ITV camera so as to precisely detect the object.
According to this method, a high quality picture image can be obtained but where the objects (rods) contact or overlap with each other as shown in FIG. 4, extraction of the contour of the rods 10 with binary encoding is difficult. Accordingly, it is difficult to detect proper rods (in this case, rods 10a and 10b on which other rods do not overlie so that they can be handled with a handling robot).